
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoMapper;
using HighlyConcurrent.Web.Business.ServiceProxies;
using CNF.Common.Base.SimpleOrm.DataBaseProvidrer;
using CNF.Common.Base.SimpleOrm.ServiceProxyies;
using HighlyConcurrent.Web.Data.DataServices;
using HighlyConcurrent.Web.Data.Entities;
using HighlyConcurrent.Web.Business.Domain;
using HighlyConcurrent.Web.Data;
using PetaPoco;


namespace HighlyConcurrent.Web.Business.ServiceProxies
{
    public interface IHWCProductServiceProxy : IServiceProxy<int, HWCProduct, HWCProductDataService,Product>
    {
 
    }


    public partial class HWCProductServiceProxy 
    {
        static HWCProductServiceProxy()
        {
		    Mapper.Initialize(cfg =>
            {
                cfg.CreateMap<HWCProduct, Product>();
                cfg.CreateMap<Product, HWCProduct>();
            });
        }

		protected HsDwmDataServiceContainer dataServiceContainer;

        protected HsDwmServiceContainer ServiceProxyContainer
        {
            get { return this.serviceContainer as HsDwmServiceContainer; }
        }
		
		public HWCProductServiceProxy(IDataBaseStoreage<Database> dataBaseStoreage, string dataBaseKey, IServiceContainer serviceContainer) : base(dataBaseStoreage, dataBaseKey, serviceContainer)
        {
            currentDataService = new HWCProductDataService(dataBaseStoreage, dataBaseKey);
			this.dataServiceContainer = new HsDwmDataServiceContainer(dataBaseStoreage, dataBaseKey);
            this.serviceContainer = serviceContainer;
        }
    }
}
 
			